const path = require('path')
const webpack = require('webpack')

const isProduction = process.env.NODE_ENV === 'production'

const resolve = dir => {
  return path.join(__dirname, dir)
}

module.exports = {
  publicPath: '/gps-web',
  configureWebpack: config => {

  },
  lintOnSave: false,
  // outputDir: resolve('/react/teacherZone/dist'),
  // publicPath: isProduction ? '/react/teacherZone/dist' : '/',
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
      .set('_router', resolve('src/router'))
      .set('_store', resolve('src/store'))
      .set('_util', resolve('src/utils'))
      .set('_api', resolve('src/api'));
      config.plugin('provide').use(webpack.ProvidePlugin, [{
        $: 'jquery',
        jquery: 'jquery',
        jQuery: 'jquery',
        'window.jQuery': 'jquery'
      }])
  },
  productionSourceMap: false,
  devServer: {
    disableHostCheck: true
  }
}
